namespace SimpleWebServices.Web
{
    using System.Web.Mvc;
    using System.Xml.Serialization;
    using SimpleWebServices.Models;
    using SimpleWebServices.Web.Mvc;

    [XmlRoot("redirection")]
    public sealed class TenantTemporaryRedirect : TemporaryRedirect
    {
        public TenantTemporaryRedirect()
            : base()
        {
        }

        public TenantTemporaryRedirect(string location)
            : base(location)
        {
        }

        public override ActionResult ToActionResult()
        {
            return new TemporaryRedirectResult(Tenant.UrlPathEncode(this.Location));
        }
    }
}